this._userWidget = new UserWidget.UserWidget(this.user);
layout.add(this._userWidget);
- this._userWidget.bind_property('label-actor', this, 'label-actor',
- GObject.BindingFlags.SYNC_CREATE);
+ this._userWidget.bind_property('label-actor',
+ this, 'label-actor',
+ GObject.BindingFlags.SYNC_CREATE);
this._timedLoginIndicator = new St.Bin({
style_class: 'login-dialog-timed-login-indicator',
x_expand: true,
y_expand: true,
});
- this.set_policy(St.PolicyType.NEVER,
- St.PolicyType.AUTOMATIC);
+ this.set_policy(
+ St.PolicyType.NEVER,
+ St.PolicyType.AUTOMATIC);
this._box = new St.BoxLayout({
vertical: true,
});
this._manager = new PopupMenu.PopupMenuManager(this._button,
- {actionMode: Shell.ActionMode.NONE});
+ {actionMode: Shell.ActionMode.NONE});
this._manager.addMenu(this._menu);
this._button.connect('clicked', () => this._menu.toggle());
this._settings = new Gio.Settings({schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA});
this._settings.connect(`changed::${GdmUtil.BANNER_MESSAGE_KEY}`,
- this._updateBanner.bind(this));
+ this._updateBanner.bind(this));
this._settings.connect(`changed::${GdmUtil.BANNER_MESSAGE_TEXT_KEY}`,
- this._updateBanner.bind(this));
+ this._updateBanner.bind(this));
this._settings.connect(`changed::${GdmUtil.DISABLE_USER_LIST_KEY}`,
- this._updateDisableUserList.bind(this));
+ this._updateDisableUserList.bind(this));
this._settings.connect(`changed::${GdmUtil.LOGO_KEY}`,
- this._updateLogo.bind(this));
+ this._updateLogo.bind(this));
this._textureCache = St.TextureCache.get_default();
this._textureCache.connectObject('texture-file-changed',
this._logoBin.destroy_all_children();
const resourceScale = this._logoBin.get_resource_scale();
if (this._logoFile) {
- let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
- this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile,
- -1, -1,
- scaleFactor,
- resourceScale));
+ const scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
+ const texture = this._textureCache.load_file_async(
+ this._logoFile,
+ -1, -1,
+ scaleFactor, resourceScale);
+ this._logoBin.add_child(texture);
}
}
open() {
Main.ctrlAltTabManager.addGroup(this,
- _('Login Window'),
- 'dialog-password-symbolic',
- {sortGroup: CtrlAltTab.SortGroup.MIDDLE});
+ _('Login Window'),
+ 'dialog-password-symbolic',
+ {sortGroup: CtrlAltTab.SortGroup.MIDDLE});
this.activate();
this.opacity = 0;
super();
this._aggregateProvider = Provider(Gio.DBus.system,
- 'org.freedesktop.realmd',
- '/org/freedesktop/realmd',
- this._reloadRealms.bind(this));
+ 'org.freedesktop.realmd',
+ '/org/freedesktop/realmd',
+ this._reloadRealms.bind(this));
this._realms = {};
this._loginFormat = null;
for (let i = 0; i < realmPaths.length; i++) {
Realm(Gio.DBus.system,
- 'org.freedesktop.realmd',
- realmPaths[i],
- this._onRealmLoaded.bind(this));
+ 'org.freedesktop.realmd',
+ realmPaths[i],
+ this._onRealmLoaded.bind(this));
}
}
this._settings = new Gio.Settings({schema_id: LOGIN_SCREEN_SCHEMA});
this._settings.connect('changed',
- this._updateDefaultService.bind(this));
+ this._updateDefaultService.bind(this));
this._updateDefaultService();
this._fprintManager = new FprintManagerProxy(Gio.DBus.system,
* @returns {Gio.DBusProxy}
*/
export function Presence(initCallback, cancellable) {
- return new PresenceProxy(Gio.DBus.session, 'org.gnome.SessionManager',
- '/org/gnome/SessionManager/Presence', initCallback, cancellable);
+ return new PresenceProxy(Gio.DBus.session,
+ 'org.gnome.SessionManager',
+ '/org/gnome/SessionManager/Presence',
+ initCallback, cancellable);
}
// Note inhibitors are immutable objects, so they don't
if (this._key) {
this._history = global.settings.get_strv(this._key);
global.settings.connect(`changed::${this._key}`,
- this._historyChanged.bind(this));
+ this._historyChanged.bind(this));
} else {
this._history = [];
}
if (this._entry) {
this._entry.connect('key-press-event',
- this._onEntryKeyPress.bind(this));
+ this._onEntryKeyPress.bind(this));
}
}
this._inputSourceManager = Keyboard.getInputSourceManager();
this._sourceChangedId = this._inputSourceManager.connect('current-source-changed',
- this._onSourceChanged.bind(this));
+ this._onSourceChanged.bind(this));
this._currentSource = this._inputSourceManager.currentSource;
if (this._ibus.is_connected())
export class IntrospectService {
constructor() {
- this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(IntrospectDBusIface,
- this);
+ this._dbusImpl =
+ Gio.DBusExportedObject.wrapJSObject(IntrospectDBusIface, this);
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell/Introspect');
Gio.DBus.session.own_name('org.gnome.Shell.Introspect',
- Gio.BusNameOwnerFlags.REPLACE,
- null, null);
+ Gio.BusNameOwnerFlags.REPLACE,
+ null, null);
this._runningApplications = {};
this._runningApplicationsDirty = true;
this._animationsEnabled = true;
this._appSystem = Shell.AppSystem.get_default();
- this._appSystem.connect('app-state-changed',
- () => {
- this._runningApplicationsDirty = true;
- this._syncRunningApplications();
- });
+ this._appSystem.connect('app-state-changed', () => {
+ this._runningApplicationsDirty = true;
+ this._syncRunningApplications();
+ });
let tracker = Shell.WindowTracker.get_default();
- tracker.connect('notify::focus-app',
- () => {
- this._activeApplicationDirty = true;
- this._syncRunningApplications();
- });
+ tracker.connect('notify::focus-app', () => {
+ this._activeApplicationDirty = true;
+ this._syncRunningApplications();
+ });
tracker.connect('tracked-windows-changed',
() => this._dbusImpl.emit_signal('WindowsChanged', null));
export function canLock() {
try {
let params = GLib.Variant.new('(ss)', ['org.gnome.DisplayManager.Manager', 'Version']);
- let result = Gio.DBus.system.call_sync('org.gnome.DisplayManager',
- '/org/gnome/DisplayManager/Manager',
- 'org.freedesktop.DBus.Properties',
- 'Get', params, null,
- Gio.DBusCallFlags.NONE,
- -1, null);
+ let result = Gio.DBus.system.call_sync(
+ 'org.gnome.DisplayManager',
+ '/org/gnome/DisplayManager/Manager',
+ 'org.freedesktop.DBus.Properties',
+ 'Get', params, null,
+ Gio.DBusCallFlags.NONE,
+ -1, null);
let version = result.deepUnpack()[0].deepUnpack();
return haveSystemd() && versionCompare('3.5.91', version);
super();
this._proxy = new SystemdLoginManager(Gio.DBus.system,
- 'org.freedesktop.login1',
- '/org/freedesktop/login1');
+ 'org.freedesktop.login1',
+ '/org/freedesktop/login1');
this._userProxy = new SystemdLoginUser(Gio.DBus.system,
- 'org.freedesktop.login1',
- '/org/freedesktop/login1/user/self');
+ 'org.freedesktop.login1',
+ '/org/freedesktop/login1/user/self');
this._proxy.connectSignal('PrepareForSleep',
- this._prepareForSleep.bind(this));
+ this._prepareForSleep.bind(this));
}
async getCurrentSessionProxy() {
for ([session, objectPath] of this._userProxy.Sessions) {
let sessionProxy = new SystemdLoginSession(Gio.DBus.system,
- 'org.freedesktop.login1',
- objectPath);
+ 'org.freedesktop.login1',
+ objectPath);
log(`Considering ${session}, class=${sessionProxy.Class}`);
if (sessionProxy.Class == 'greeter') {
log(`Yes, will monitor session ${session}`);
*/
export function PermissionStore(initCallback, cancellable) {
return new PermissionStoreProxy(Gio.DBus.session,
- 'org.freedesktop.impl.portal.PermissionStore',
- '/org/freedesktop/impl/portal/PermissionStore',
- initCallback, cancellable);
+ 'org.freedesktop.impl.portal.PermissionStore',
+ '/org/freedesktop/impl/portal/PermissionStore',
+ initCallback, cancellable);
}
this._userManager = AccountsService.UserManager.get_default();
this._userManager.connect('notify::is-loaded',
- () => this._updateMultiUser());
+ () => this._updateMultiUser());
this._userManager.connect('notify::has-multiple-users',
- () => this._updateMultiUser());
+ () => this._updateMultiUser());
this._userManager.connect('user-added',
- () => this._updateMultiUser());
+ () => this._updateMultiUser());
this._userManager.connect('user-removed',
- () => this._updateMultiUser());
+ () => this._updateMultiUser());
this._lockdownSettings.connect(`changed::${DISABLE_USER_SWITCH_KEY}`,
- () => this._updateSwitchUser());
+ () => this._updateSwitchUser());
this._lockdownSettings.connect(`changed::${DISABLE_LOG_OUT_KEY}`,
- () => this._updateLogout());
+ () => this._updateLogout());
global.settings.connect(`changed::${ALWAYS_SHOW_LOG_OUT_KEY}`,
- () => this._updateLogout());
+ () => this._updateLogout());
this._lockdownSettings.connect(`changed::${DISABLE_LOCK_SCREEN_KEY}`,
- () => this._updateLockScreen());
+ () => this._updateLockScreen());
this._lockdownSettings.connect(`changed::${DISABLE_LOG_OUT_KEY}`,
- () => this._updateHaveShutdown());
+ () => this._updateHaveShutdown());
this.forceUpdate();
this._updateOrientationLockStatus();
});
Main.layoutManager.connect('monitors-changed',
- () => this._updateOrientationLock());
+ () => this._updateOrientationLock());
this._monitorManager.connect('notify::panel-orientation-managed',
() => this._updateOrientationLock());
this._updateOrientationLock();
*/
export function spawnApp(argv) {
try {
- let app = Gio.AppInfo.create_from_commandline(argv.join(' '), null,
- Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION);
+ const app = Gio.AppInfo.create_from_commandline(argv.join(' '),
+ null,
+ Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION);
let context = global.create_app_launch_context(0, -1);
app.launch([], context);
this._onPermStoreChanged(this._permStore, '', params);
});
this._permStore.connectSignal('Changed',
- this._onPermStoreChanged.bind(this));
+ this._onPermStoreChanged.bind(this));
this._locationSettings = new Gio.Settings({schema_id: 'org.gnome.system.location'});
this._locationSettings.connect('changed::enabled',
- this._updateAutoLocation.bind(this));
+ this._updateAutoLocation.bind(this));
this._world = GWeather.Location.get_world();
this._gclueLocationChangedId =
this._gclueService.connect('notify::location',
- this._onGClueLocationChanged.bind(this));
+ this._onGClueLocationChanged.bind(this));
this._onGClueLocationChanged();
} else {
if (this._gclueLocationChangedId)
_onGClueLocationChanged() {
let geoLocation = this._gclueService.location;
- let location = GWeather.Location.new_detached(geoLocation.description,
- null,
- geoLocation.latitude,
- geoLocation.longitude);
+ let location = GWeather.Location.new_detached(
+ geoLocation.description,
+ null,
+ geoLocation.latitude,
+ geoLocation.longitude);
this._setLocation(location);
}
CloseAsync(invocation, _params) {
if (this._invocation.get_sender() != invocation.get_sender()) {
- invocation.return_error_literal(Gio.DBusError,
- Gio.DBusError.ACCESS_DENIED,
- '');
+ invocation.return_error_literal(
+ Gio.DBusError,
+ Gio.DBusError.ACCESS_DENIED,
+ '');
return;
}
// Delay actual response until the end of the close animation (if any)
this.connect('closed', () => {
- this._invocation.return_value(new GLib.Variant('(ua{sv})',
- [response, results]));
+ this._invocation.return_value(
+ new GLib.Variant('(ua{sv})', [response, results]));
});
this.close();
}
AccessDialogAsync(params, invocation) {
if (this._accessDialog) {
- invocation.return_error_literal(Gio.DBusError,
- Gio.DBusError.LIMITS_EXCEEDED,
- 'Already showing a system access dialog');
+ invocation.return_error_literal(
+ Gio.DBusError,
+ Gio.DBusError.LIMITS_EXCEEDED,
+ 'Already showing a system access dialog');
return;
}
// We probably want to use parentWindow and global.display.focus_window
// for this check in the future
if (appId && `${appId}.desktop` !== this._windowTracker.focus_app.id) {
- invocation.return_error_literal(Gio.DBusError,
- Gio.DBusError.ACCESS_DENIED,
- 'Only the focused app is allowed to show a system access dialog');
+ invocation.return_error_literal(
+ Gio.DBusError,
+ Gio.DBusError.ACCESS_DENIED,
+ 'Only the focused app is allowed to show a system access dialog');
return;
}
// We actually want the second window if we're in the unset state
if (this._currentWindow == -1)
this._currentWindow = 0;
- return SwitcherPopup.mod(this._currentWindow + 1,
- this._items[this._selectedIndex].cachedWindows.length);
+ return SwitcherPopup.mod(
+ this._currentWindow + 1,
+ this._items[this._selectedIndex].cachedWindows.length);
}
_previousWindow() {
// Also assume second window here
if (this._currentWindow == -1)
this._currentWindow = 1;
- return SwitcherPopup.mod(this._currentWindow - 1,
- this._items[this._selectedIndex].cachedWindows.length);
+ return SwitcherPopup.mod(
+ this._currentWindow - 1,
+ this._items[this._selectedIndex].cachedWindows.length);
}
_closeAppWindow(appIndex, windowIndex) {
this._icon.add_actor(_createWindowClone(mutterWindow, size * scaleFactor));
if (this.app) {
- this._icon.add_actor(this._createAppIcon(this.app,
- APP_ICON_SIZE_SMALL));
+ this._icon.add_actor(
+ this._createAppIcon(this.app, APP_ICON_SIZE_SMALL));
}
break;
let info = this._dbusImpl.get_info();
const deviceName = Object.keys(AudioDevice)
.filter(dev => AudioDevice[dev] === device)[0].toLowerCase();
- connection.emit_signal(this._audioSelectionDialog._sender,
- this._dbusImpl.get_object_path(),
- info ? info.name : null,
- 'DeviceSelected',
- GLib.Variant.new('(s)', [deviceName]));
+ connection.emit_signal(
+ this._audioSelectionDialog._sender,
+ this._dbusImpl.get_object_path(),
+ info ? info.name : null,
+ 'DeviceSelected',
+ GLib.Variant.new('(s)', [deviceName]));
}
OpenAsync(params, invocation) {
dialog.connect('closed', this._onDialogClosed.bind(this));
dialog.connect('device-selected',
- this._onDeviceSelected.bind(this));
+ this._onDeviceSelected.bind(this));
dialog.open();
this._audioSelectionDialog = dialog;
let monitor = file.monitor(Gio.FileMonitorFlags.NONE, null);
monitor.connect('changed',
- (obj, theFile, otherFile, eventType) => {
- // Ignore CHANGED and CREATED events, since in both cases
- // we'll get a CHANGES_DONE_HINT event when done.
- if (eventType != Gio.FileMonitorEvent.CHANGED &&
- eventType != Gio.FileMonitorEvent.CREATED)
- this.emit('file-changed', file);
- });
+ (obj, theFile, otherFile, eventType) => {
+ // Ignore CHANGED and CREATED events, since in both cases
+ // we'll get a CHANGES_DONE_HINT event when done.
+ if (eventType != Gio.FileMonitorEvent.CHANGED &&
+ eventType != Gio.FileMonitorEvent.CREATED)
+ this.emit('file-changed', file);
+ });
this._fileMonitors[key] = monitor;
}
this._cache.monitorFile(file);
let signalId = this._cache.connect('file-changed',
- (cache, changedFile) => {
- if (changedFile.equal(file)) {
- let imageCache = Meta.BackgroundImageCache.get_default();
- imageCache.purge(changedFile);
- this._emitChangedSignal();
- }
- });
+ (cache, changedFile) => {
+ if (changedFile.equal(file)) {
+ let imageCache = Meta.BackgroundImageCache.get_default();
+ imageCache.purge(changedFile);
+ this._emitChangedSignal();
+ }
+ });
this._fileWatches[key] = signalId;
}
this._setLoaded();
if (files.length > 1) {
this.set_blend(files[0], files[1],
- this._animation.transitionProgress,
- this._style);
+ this._animation.transitionProgress,
+ this._style);
} else if (files.length > 0) {
this.set_file(files[0], this._style);
} else {
let nSteps = 255 / ANIMATION_OPACITY_STEP_INCREMENT;
let timePerStep = (this._animation.transitionDuration * 1000) / nSteps;
- let interval = Math.max(ANIMATION_MIN_WAKEUP_INTERVAL * 1000,
- timePerStep);
+ let interval = Math.max(
+ ANIMATION_MIN_WAKEUP_INTERVAL * 1000,
+ timePerStep);
if (interval > GLib.MAXUINT32)
return;
this._updateAnimationTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
- interval,
- () => {
- this._updateAnimationTimeoutId = 0;
- this._updateAnimation();
- return GLib.SOURCE_REMOVE;
- });
+ interval,
+ () => {
+ this._updateAnimationTimeoutId = 0;
+ this._updateAnimation();
+ return GLib.SOURCE_REMOVE;
+ });
GLib.Source.set_name_by_id(this._updateAnimationTimeoutId, '[gnome-shell] this._updateAnimation');
}
const monitorManager = global.backend.get_monitor_manager();
this._monitorsChangedId =
monitorManager.connect('monitors-changed',
- this._onMonitorsChanged.bind(this));
+ this._onMonitorsChanged.bind(this));
this._interfaceSettings = new Gio.Settings({schema_id: INTERFACE_SCHEMA});
}
if (!skipTopRight) {
cr.lineTo(x2 - borderRadius, y1);
- cr.arc(x2 - borderRadius, y1 + borderRadius, borderRadius,
- 3 * Math.PI / 2, Math.PI * 2);
+ cr.arc(
+ x2 - borderRadius, y1 + borderRadius, borderRadius,
+ 3 * Math.PI / 2, Math.PI * 2);
}
if (this._arrowSide == St.Side.RIGHT && rise) {
if (!skipBottomRight) {
cr.lineTo(x2, y2 - borderRadius);
- cr.arc(x2 - borderRadius, y2 - borderRadius, borderRadius,
- 0, Math.PI / 2);
+ cr.arc(
+ x2 - borderRadius, y2 - borderRadius, borderRadius,
+ 0, Math.PI / 2);
}
if (this._arrowSide == St.Side.BOTTOM && rise) {
if (!skipBottomLeft) {
cr.lineTo(x1 + borderRadius, y2);
- cr.arc(x1 + borderRadius, y2 - borderRadius, borderRadius,
- Math.PI / 2, Math.PI);
+ cr.arc(
+ x1 + borderRadius, y2 - borderRadius, borderRadius,
+ Math.PI / 2, Math.PI);
}
if (this._arrowSide == St.Side.LEFT && rise) {
if (!skipTopLeft) {
cr.lineTo(x1, y1 + borderRadius);
- cr.arc(x1 + borderRadius, y1 + borderRadius, borderRadius,
- Math.PI, 3 * Math.PI / 2);
+ cr.arc(
+ x1 + borderRadius, y1 + borderRadius, borderRadius,
+ Math.PI, 3 * Math.PI / 2);
}
const [hasColor, bgColor] =
if (shouldTrack) {
Main.layoutManager.trackChrome(this._dialog,
- {affectsInputRegion: true});
+ {affectsInputRegion: true});
} else {
Main.layoutManager.untrackChrome(this._dialog);
}
this._activeOperations = new Map();
this._session = new GnomeSession.SessionManager();
this._session.connectSignal('InhibitorAdded',
- this._InhibitorsChanged.bind(this));
+ this._InhibitorsChanged.bind(this));
this._session.connectSignal('InhibitorRemoved',
- this._InhibitorsChanged.bind(this));
+ this._InhibitorsChanged.bind(this));
this._inhibited = false;
this._volumeMonitor = Gio.VolumeMonitor.get();
let player = global.display.get_sound_player();
player.play_from_theme('device-added-media',
- _('External drive connected'),
- null);
+ _('External drive connected'),
+ null);
}
_onDriveDisconnected() {
let player = global.display.get_sound_player();
player.play_from_theme('device-removed-media',
- _('External drive disconnected'),
- null);
+ _('External drive disconnected'),
+ null);
}
_onDriveEjectButton(monitor, drive) {
this._activeOperations.set(volume, operation);
volume.mount(0, mountOp, null,
- this._onVolumeMounted.bind(this));
+ this._onVolumeMounted.bind(this));
}
_onVolumeMounted(volume, res) {
let prevOperation = this._activeOperations.get(volume);
const existingDialog = prevOperation?.borrowDialog();
let operation =
- new ShellMountOperation.ShellMountOperation(volume,
- {existingDialog});
+ new ShellMountOperation.ShellMountOperation(volume, {existingDialog});
this._mountVolume(volume, operation);
}
try {
retval = app.launch(files,
- global.create_app_launch_context(0, -1));
+ global.create_app_launch_context(0, -1));
} catch (e) {
log(`Unable to launch the app ${app.get_name()}: ${e}`);
}
const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface);
function HotplugSniffer() {
return new HotplugSnifferProxy(Gio.DBus.session,
- 'org.gnome.Shell.HotplugSniffer',
- '/org/gnome/Shell/HotplugSniffer');
+ 'org.gnome.Shell.HotplugSniffer',
+ '/org/gnome/Shell/HotplugSniffer');
}
class ContentTypeDiscoverer {
if (!this._registered) {
this.register(Gio.DBus.session);
this._dbusId = Gio.DBus.session.own_name('org.gnome.keyring.SystemPrompter',
- Gio.BusNameOwnerFlags.ALLOW_REPLACEMENT, null, null);
+ Gio.BusNameOwnerFlags.ALLOW_REPLACEMENT, null, null);
this._registered = true;
}
this._enabled = true;
this._readStdoutOldStyle();
this._childWatch = GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid,
- this._vpnChildFinished.bind(this));
+ this._vpnChildFinished.bind(this));
this._writeConnection();
} catch (e) {
_updateAvatarIcon() {
this.iconUpdated();
if (this._notification) {
- this._notification.update(this._notification.title,
- this._notification.bannerBodyText,
- {gicon: this.getIcon()});
+ this._notification.update(
+ this._notification.title,
+ this._notification.bannerBodyText,
+ {gicon: this.getIcon()});
}
}
_presenceChanged(_contact, _presence, _status, _message) {
if (this._notification) {
- this._notification.update(this._notification.title,
- this._notification.bannerBodyText,
- {secondaryGIcon: this.getSecondaryIcon()});
+ this._notification.update(
+ this._notification.title,
+ this._notification.bannerBodyText,
+ {secondaryGIcon: this.getSecondaryIcon()});
}
}
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
let windows = display.get_tab_list(Meta.TabList.DOCKS,
- activeWorkspace);
+ activeWorkspace);
let windowTracker = Shell.WindowTracker.get_default();
let textureCache = St.TextureCache.get_default();
for (let i = 0; i < windows.length; i++) {
this._popup = new CtrlAltTabPopup(items);
this._popup.show(backward, binding, mask);
- this._popup.connect('destroy',
- () => {
- this._popup = null;
- });
+ this._popup.connect('destroy', () => {
+ this._popup = null;
+ });
}
}
let themeNode = this.get_theme_node();
forWidth = themeNode.adjust_for_width(forWidth);
let [minHeight, natHeight] = super.vfunc_get_preferred_height(forWidth);
- return themeNode.adjust_preferred_height(minHeight * this.scale_y,
- natHeight * this.scale_y);
+ return themeNode.adjust_preferred_height(
+ minHeight * this.scale_y,
+ natHeight * this.scale_y);
}
vfunc_get_preferred_width(forHeight) {
let themeNode = this.get_theme_node();
forHeight = themeNode.adjust_for_height(forHeight);
let [minWidth, natWidth] = super.vfunc_get_preferred_width(forHeight);
- return themeNode.adjust_preferred_width(minWidth * this.scale_x,
- natWidth * this.scale_x);
+ return themeNode.adjust_preferred_width(
+ minWidth * this.scale_x,
+ natWidth * this.scale_x);
}
showLabel() {
_createAppItem(app) {
let appIcon = new DashIcon(app);
- appIcon.connect('menu-state-changed',
- (o, opened) => {
- this._itemMenuStateChanged(item, opened);
- });
+ appIcon.connect('menu-state-changed', (o, opened) => {
+ this._itemMenuStateChanged(item, opened);
+ });
let item = new DashItemContainer();
item.setChild(appIcon);
// Scale the icon's texture to the previous size and
// tween to the new size
- icon.icon.set_size(icon.icon.width * scale,
- icon.icon.height * scale);
+ icon.icon.set_size(
+ icon.icon.width * scale,
+ icon.icon.height * scale);
icon.icon.ease({
width: targetWidth,
}
for (let i = 0; i < addedItems.length; i++) {
- this._box.insert_child_at_index(addedItems[i].item,
- addedItems[i].pos);
+ this._box.insert_child_at_index(
+ addedItems[i].item,
+ addedItems[i].pos);
}
for (let i = 0; i < removedActors.length; i++) {
this._dragPlaceholder = new DragPlaceholderItem();
this._dragPlaceholder.child.set_width(this.iconSize);
this._dragPlaceholder.child.set_height(this.iconSize / 2);
- this._box.insert_child_at_index(this._dragPlaceholder,
- this._dragPlaceholderPos);
+ this._box.insert_child_at_index(
+ this._dragPlaceholder,
+ this._dragPlaceholderPos);
this._dragPlaceholder.show(fadeIn);
}
_grabActor(device, touchSequence) {
this._grabDevice(this.actor, device, touchSequence);
this._onEventId = this.actor.connect('event',
- this._onEvent.bind(this));
+ this._onEvent.bind(this));
}
_ungrabActor() {
}
_pickTargetActor() {
- return this._dragActor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL,
- this._dragX, this._dragY);
+ return this._dragActor.get_stage().get_actor_at_pos(
+ Clutter.PickMode.ALL, this._dragX, this._dragY);
}
_updateDragHover() {
// We currently loop through all parents on drag-over even if one of the children has handled it.
// We can check the return value of the function and break the loop if it's true if we don't want
// to continue checking the parents.
- let result = target._delegate.handleDragOver(this.actor._delegate,
- this._dragActor,
- targX,
- targY,
- 0);
+ let result = target._delegate.handleDragOver(
+ this.actor._delegate,
+ this._dragActor,
+ targX,
+ targY,
+ 0);
if (result != DragMotionResult.CONTINUE) {
global.display.set_cursor(DRAG_CURSOR_MAP[result]);
return GLib.SOURCE_REMOVE;
return;
this._updateHoverId = GLib.idle_add(GLib.PRIORITY_DEFAULT,
- this._updateDragHover.bind(this));
+ this._updateDragHover.bind(this));
GLib.Source.set_name_by_id(this._updateHoverId, '[gnome-shell] this._updateDragHover');
}
let [stageX, stageY] = event.get_coords();
this._dragX = stageX;
this._dragY = stageY;
- this._dragActor.set_position(stageX + this._dragOffsetX,
- stageY + this._dragOffsetY);
+ this._dragActor.set_position(
+ stageX + this._dragOffsetX,
+ stageY + this._dragOffsetY);
this._queueUpdateDragHover();
return true;
_dragActorDropped(event) {
let [dropX, dropY] = event.get_coords();
- let target = this._dragActor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL,
- dropX, dropY);
+ let target = this._dragActor.get_stage().get_actor_at_pos(
+ Clutter.PickMode.ALL, dropX, dropY);
// We call observers only once per motion with the innermost
// target actor. If necessary, the observer can walk the
this._updatesPermission = null;
this._pkOfflineProxy = new PkOfflineProxy(Gio.DBus.system,
- 'org.freedesktop.PackageKit',
- '/org/freedesktop/PackageKit',
- this._onPkOfflineProxyCreated.bind(this));
+ 'org.freedesktop.PackageKit',
+ '/org/freedesktop/PackageKit',
+ this._onPkOfflineProxyCreated.bind(this));
this._powerProxy = new UPowerProxy(Gio.DBus.system,
- 'org.freedesktop.UPower',
- '/org/freedesktop/UPower/devices/DisplayDevice',
- (proxy, error) => {
- if (error) {
- log(error.message);
- return;
- }
- this._powerProxy.connect('g-properties-changed',
- this._sync.bind(this));
- this._sync();
- });
+ 'org.freedesktop.UPower',
+ '/org/freedesktop/UPower/devices/DisplayDevice',
+ (proxy, error) => {
+ if (error) {
+ log(error.message);
+ return;
+ }
+ this._powerProxy.connect('g-properties-changed',
+ this._sync.bind(this));
+ this._sync();
+ });
this._secondsLeft = 0;
this._totalSecondsToStayOpen = 0;
this._rebootButton = null;
this._rebootButtonAlt = null;
- this.connect('opened',
- this._onOpened.bind(this));
+ this.connect('opened', this._onOpened.bind(this));
this._user.connectObject(
'notify::is-loaded', this._sync.bind(this),
this._batteryWarning.visible = this._shouldShowLowBatteryWarning(dialogContent);
let description;
- let displayTime = _roundSecondsToInterval(this._totalSecondsToStayOpen,
- this._secondsLeft,
- 10);
+ let displayTime = _roundSecondsToInterval(
+ this._totalSecondsToStayOpen, this._secondsLeft, 10);
if (this._user.is_loaded) {
let realName = this._user.get_real_name();
this._sessionSection.list.destroy_all_children();
if (!(this._type in DialogContent)) {
- invocation.return_dbus_error('org.gnome.Shell.ModalDialog.TypeError',
- 'Unknown dialog type requested');
+ invocation.return_dbus_error(
+ 'org.gnome.Shell.ModalDialog.TypeError',
+ 'Unknown dialog type requested');
return;
}
this._updateButtons();
if (!this.open(timestamp)) {
- invocation.return_dbus_error('org.gnome.Shell.ModalDialog.GrabError',
- 'Cannot grab pointer and keyboard');
+ invocation.return_dbus_error(
+ 'org.gnome.Shell.ModalDialog.GrabError',
+ 'Cannot grab pointer and keyboard');
return;
}
this._preeditText.text = text.get_text();
let attrs = text.get_attributes();
- if (attrs) {
- this._setTextAttributes(this._preeditText.clutter_text,
- attrs);
- }
+ if (attrs)
+ this._setTextAttributes(this._preeditText.clutter_text, attrs);
});
panelService.connect('show-preedit-text', () => {
this._preeditText.show();
}
this._candidateArea.setCandidates(indexes,
- candidates,
- cursorPos % pageSize,
- lookupTable.is_cursor_visible());
+ candidates,
+ cursorPos % pageSize,
+ lookupTable.is_cursor_visible());
this._candidateArea.setOrientation(lookupTable.get_orientation());
this._candidateArea.updateButtons(lookupTable.is_round(), page, nPages);
});
let seat = Clutter.get_default_backend().get_default_seat();
seat.connect('kbd-a11y-flags-changed',
- this._showKbdA11yDialog.bind(this));
+ this._showKbdA11yDialog.bind(this));
}
_showKbdA11yDialog(seat, newFlags, whatChanged) {
keyvalPress(keyval) {
this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000,
- keyval, Clutter.KeyState.PRESSED);
+ keyval, Clutter.KeyState.PRESSED);
}
keyvalRelease(keyval) {
this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000,
- keyval, Clutter.KeyState.RELEASED);
+ keyval, Clutter.KeyState.RELEASED);
}
}
export const MonitorConstraint = GObject.registerClass({
Properties: {
- 'primary': GObject.ParamSpec.boolean('primary',
- 'Primary', 'Track primary monitor',
- GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
- false),
- 'index': GObject.ParamSpec.int('index',
- 'Monitor index', 'Track specific monitor',
- GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
- -1, 64, -1),
- 'work-area': GObject.ParamSpec.boolean('work-area',
- 'Work-area', 'Track monitor\'s work-area',
- GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
- false),
+ 'primary': GObject.ParamSpec.boolean(
+ 'primary', 'Primary', 'Track primary monitor',
+ GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
+ false),
+ 'index': GObject.ParamSpec.int(
+ 'index', 'Monitor index', 'Track specific monitor',
+ GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
+ -1, 64, -1),
+ 'work-area': GObject.ParamSpec.boolean(
+ 'work-area', 'Work-area', 'Track monitor\'s work-area',
+ GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
+ false),
},
}, class MonitorConstraint extends Clutter.Constraint {
_init(props) {
trackFullscreen: true,
});
this.panelBox.connect('notify::allocation',
- this._panelBoxChanged.bind(this));
+ this._panelBoxChanged.bind(this));
this.modalDialogGroup = new St.Widget({
name: 'modalDialogGroup',
});
this._interfaceSettings.connect('changed::enable-hot-corners',
- this._updateHotCorners.bind(this));
+ this._updateHotCorners.bind(this));
// Need to update struts on new workspaces when they are added
let workspaceManager = global.workspace_manager;
workspaceManager.connect('notify::n-workspaces',
- this._queueUpdateRegions.bind(this));
+ this._queueUpdateRegions.bind(this));
let display = global.display;
display.connect('restacked',
let nMonitors = display.get_n_monitors();
for (let i = 0; i < nMonitors; i++) {
this.monitors.push(new Monitor(i,
- display.get_monitor_geometry(i),
- display.get_monitor_scale(i)));
+ display.get_monitor_geometry(i),
+ display.get_monitor_scale(i)));
}
if (nMonitors == 0) {
}
_updateKeyboardBox() {
- this.keyboardBox.set_position(this.keyboardMonitor.x,
- this.keyboardMonitor.y + this.keyboardMonitor.height);
+ this.keyboardBox.set_position(
+ this.keyboardMonitor.x,
+ this.keyboardMonitor.y + this.keyboardMonitor.height);
this.keyboardBox.set_size(this.keyboardMonitor.width, -1);
}
this._setupFallbackCornerIfNeeded(layoutManager);
- this._pressureBarrier = new PressureBarrier(HOT_CORNER_PRESSURE_THRESHOLD,
- HOT_CORNER_PRESSURE_TIMEOUT,
- Shell.ActionMode.NORMAL |
- Shell.ActionMode.OVERVIEW);
+ this._pressureBarrier = new PressureBarrier(
+ HOT_CORNER_PRESSURE_THRESHOLD,
+ HOT_CORNER_PRESSURE_TIMEOUT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW);
this._pressureBarrier.connect('trigger', this._toggleOverview.bind(this));
let px = 0.0;
}
this._corner.connect('enter-event',
- this._onCornerEntered.bind(this));
+ this._onCornerEntered.bind(this));
this._corner.connect('leave-event',
- this._onCornerLeft.bind(this));
+ this._onCornerLeft.bind(this));
}
}
vfunc_build_pipeline() {
this.add_glsl_snippet(Shell.SnippetHook.FRAGMENT,
- VIGNETTE_DECLARATIONS, VIGNETTE_CODE, true);
+ VIGNETTE_DECLARATIONS, VIGNETTE_CODE, true);
}
get brightness() {
_update(event) {
let [stageX, stageY] = event.get_coords();
- let target = global.stage.get_actor_at_pos(Clutter.PickMode.ALL,
- stageX,
- stageY);
+ let target = global.stage.get_actor_at_pos(
+ Clutter.PickMode.ALL, stageX, stageY);
if (target != this._pointerTarget)
this._target = target;
});
Main.extensionManager.connect('extension-loaded',
- this._loadExtension.bind(this));
+ this._loadExtension.bind(this));
}
_loadExtension(o, uuid) {
this._interfaceSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.interface'});
this._interfaceSettings.connect('changed::monospace-font-name',
- this._updateFont.bind(this));
+ this._updateFont.bind(this));
this._updateFont();
// We want it to appear to slide out from underneath the panel
Main.uiGroup.add_actor(this);
Main.uiGroup.set_child_below_sibling(this,
- Main.layoutManager.panelBox);
+ Main.layoutManager.panelBox);
Main.layoutManager.panelBox.connect('notify::allocation',
- this._queueResize.bind(this));
+ this._queueResize.bind(this));
Main.layoutManager.keyboardBox.connect('notify::allocation',
- this._queueResize.bind(this));
+ this._queueResize.bind(this));
this._objInspector = new ObjInspector(this);
Main.uiGroup.add_actor(this._objInspector);
this.width = myWidth;
this.height = myHeight;
this._objInspector.set_size(Math.floor(myWidth * 0.8), Math.floor(myHeight * 0.8));
- this._objInspector.set_position(this.x + Math.floor(myWidth * 0.1),
- this._targetY + Math.floor(myHeight * 0.1));
+ this._objInspector.set_position(
+ this.x + Math.floor(myWidth * 0.1),
+ this._targetY + Math.floor(myHeight * 0.1));
}
insertObject(obj) {
this.setBorderPaintTarget(null);
let settings = St.Settings.get();
- let duration = Math.min(LG_ANIMATION_TIME / settings.slow_down_factor,
- LG_ANIMATION_TIME);
+ let duration = Math.min(
+ LG_ANIMATION_TIME / settings.slow_down_factor,
+ LG_ANIMATION_TIME);
this.ease({
y: this._hiddenY,
duration,
let color = Clutter.Color.get_static(Clutter.StaticColor.WHITE);
let [minFilter, magFilter] = actor.get_content_scaling_filters();
let textureNode = new Clutter.TextureNode(this._texture,
- color, minFilter, magFilter);
+ color, minFilter, magFilter);
textureNode.set_name('MouseSpriteContent');
node.add_child(textureNode);
this._settings = new Gio.Settings({schema_id: MAGNIFIER_SCHEMA});
this._settings.connect(`changed::${SCREEN_POSITION_KEY}`,
- this._updateScreenPosition.bind(this));
+ this._updateScreenPosition.bind(this));
this._settings.connect(`changed::${MAG_FACTOR_KEY}`,
- this._updateMagFactor.bind(this));
+ this._updateMagFactor.bind(this));
this._settings.connect(`changed::${LENS_MODE_KEY}`,
- this._updateLensMode.bind(this));
+ this._updateLensMode.bind(this));
this._settings.connect(`changed::${CLAMP_MODE_KEY}`,
- this._updateClampMode.bind(this));
+ this._updateClampMode.bind(this));
this._settings.connect(`changed::${MOUSE_TRACKING_KEY}`,
- this._updateMouseTrackingMode.bind(this));
+ this._updateMouseTrackingMode.bind(this));
this._settings.connect(`changed::${FOCUS_TRACKING_KEY}`,
- this._updateFocusTrackingMode.bind(this));
+ this._updateFocusTrackingMode.bind(this));
this._settings.connect(`changed::${CARET_TRACKING_KEY}`,
- this._updateCaretTrackingMode.bind(this));
+ this._updateCaretTrackingMode.bind(this));
this._settings.connect(`changed::${INVERT_LIGHTNESS_KEY}`,
- this._updateInvertLightness.bind(this));
+ this._updateInvertLightness.bind(this));
this._settings.connect(`changed::${COLOR_SATURATION_KEY}`,
- this._updateColorSaturation.bind(this));
+ this._updateColorSaturation.bind(this));
this._settings.connect(`changed::${BRIGHT_RED_KEY}`,
- this._updateBrightness.bind(this));
+ this._updateBrightness.bind(this));
this._settings.connect(`changed::${BRIGHT_GREEN_KEY}`,
- this._updateBrightness.bind(this));
+ this._updateBrightness.bind(this));
this._settings.connect(`changed::${BRIGHT_BLUE_KEY}`,
- this._updateBrightness.bind(this));
+ this._updateBrightness.bind(this));
this._settings.connect(`changed::${CONTRAST_RED_KEY}`,
- this._updateContrast.bind(this));
+ this._updateContrast.bind(this));
this._settings.connect(`changed::${CONTRAST_GREEN_KEY}`,
- this._updateContrast.bind(this));
+ this._updateContrast.bind(this));
this._settings.connect(`changed::${CONTRAST_BLUE_KEY}`,
- this._updateContrast.bind(this));
+ this._updateContrast.bind(this));
this._settings.connect(`changed::${SHOW_CROSS_HAIRS_KEY}`, () => {
this.setCrosshairsVisible(this._settings.get_boolean(SHOW_CROSS_HAIRS_KEY));
this._signalConnections = [];
let id = Main.layoutManager.connect('monitors-changed',
- this._monitorsChanged.bind(this));
+ this._monitorsChanged.bind(this));
this._signalConnections.push([Main.layoutManager, id]);
id = this._focusCaretTracker.connect('caret-moved', this._updateCaret.bind(this));
this._clones.push(crosshairsActor);
// Clones don't share visibility.
- this.bind_property('visible', crosshairsActor, 'visible',
- GObject.BindingFlags.SYNC_CREATE);
+ this.bind_property('visible',
+ crosshairsActor, 'visible',
+ GObject.BindingFlags.SYNC_CREATE);
}
container.add_actor(crosshairsActor);
if (sessionMode.isPrimary)
_loadDefaultStylesheet();
- wm.allowKeybinding('overlay-key', Shell.ActionMode.NORMAL |
- Shell.ActionMode.OVERVIEW);
+ wm.allowKeybinding('overlay-key',
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW);
wm.allowKeybinding('locate-pointer-key', Shell.ActionMode.ALL);
wm.setCustomKeybindingHandler('panel-run-dialog',
- Shell.ActionMode.NORMAL |
- Shell.ActionMode.OVERVIEW,
- sessionMode.hasRunDialog ? openRunDialog : null);
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ sessionMode.hasRunDialog ? openRunDialog : null);
if (!sessionMode.hasRunDialog) {
if (runDialog)
const LabelExpanderLayout = GObject.registerClass({
Properties: {
- 'expansion': GObject.ParamSpec.double('expansion',
- 'Expansion',
- 'Expansion of the layout, between 0 (collapsed) ' +
- 'and 1 (fully expanded',
- GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
- 0, 1, 0),
+ 'expansion': GObject.ParamSpec.double(
+ 'expansion', 'Expansion', 'Expansion',
+ GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
+ 0, 1, 0),
},
}, class LabelExpanderLayout extends Clutter.LayoutManager {
_init(params) {
setBody(text) {
this._bodyText = text;
this.bodyLabel.setMarkup(text ? text.replace(/\n/g, ' ') : '',
- this._useBodyMarkup);
+ this._useBodyMarkup);
if (this._expandedLabel)
this._expandedLabel.setMarkup(text, this._useBodyMarkup);
}
if (this._bodyStack.get_n_children() < 2) {
this._expandedLabel = new URLHighlighter(this._bodyText,
- true, this._useBodyMarkup);
+ true, this._useBodyMarkup);
this.setExpandedBody(this._expandedLabel);
}
let constraint = new Layout.MonitorConstraint({primary: true});
Main.layoutManager.panelBox.bind_property('visible',
- constraint, 'work-area',
- GObject.BindingFlags.SYNC_CREATE);
+ constraint, 'work-area',
+ GObject.BindingFlags.SYNC_CREATE);
this.add_constraint(constraint);
this._bannerBin = new St.Widget({
layout_manager: new Clutter.BinLayout(),
});
this._bannerBin.connect('key-release-event',
- this._onNotificationKeyRelease.bind(this));
+ this._onNotificationKeyRelease.bind(this));
this._bannerBin.connect('notify::hover',
- this._onNotificationHoverChanged.bind(this));
+ this._onNotificationHoverChanged.bind(this));
this.add_actor(this._bannerBin);
this._notificationFocusGrabber = new FocusGrabber(this._bannerBin);
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
Main.overview.connect('window-drag-begin',
- this._onDragBegin.bind(this));
+ this._onDragBegin.bind(this));
Main.overview.connect('window-drag-cancelled',
- this._onDragEnd.bind(this));
+ this._onDragEnd.bind(this));
Main.overview.connect('window-drag-end',
- this._onDragEnd.bind(this));
+ this._onDragEnd.bind(this));
Main.overview.connect('item-drag-begin',
- this._onDragBegin.bind(this));
+ this._onDragBegin.bind(this));
Main.overview.connect('item-drag-cancelled',
- this._onDragEnd.bind(this));
+ this._onDragEnd.bind(this));
Main.overview.connect('item-drag-end',
- this._onDragEnd.bind(this));
+ this._onDragEnd.bind(this));
Main.xdndHandler.connect('drag-begin',
- this._onDragBegin.bind(this));
+ this._onDragBegin.bind(this));
Main.xdndHandler.connect('drag-end',
- this._onDragEnd.bind(this));
+ this._onDragEnd.bind(this));
Main.wm.addKeybinding('focus-active-notification',
- new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
- Meta.KeyBindingFlags.NONE,
- Shell.ActionMode.NORMAL |
- Shell.ActionMode.OVERVIEW,
- this._expandActiveNotification.bind(this));
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.NONE,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._expandActiveNotification.bind(this));
this._sources = new Set();
let full = this.queueCount + bannerCount >= MAX_NOTIFICATIONS_IN_QUEUE;
if (!full || notification.urgency == Urgency.CRITICAL) {
notification.connect('destroy',
- this._onNotificationDestroy.bind(this));
+ this._onNotificationDestroy.bind(this));
this._notificationQueue.push(notification);
this._notificationQueue.sort(
(n1, n2) => n2.urgency - n1.urgency);
export const ModalDialog = GObject.registerClass({
Properties: {
- 'state': GObject.ParamSpec.int('state', 'Dialog state', 'state',
- GObject.ParamFlags.READABLE,
- Math.min(...Object.values(State)),
- Math.max(...Object.values(State)),
- State.CLOSED),
+ 'state': GObject.ParamSpec.int(
+ 'state', 'Dialog state', 'state',
+ GObject.ParamFlags.READABLE,
+ Math.min(...Object.values(State)),
+ Math.max(...Object.values(State)),
+ State.CLOSED),
},
Signals: {'opened': {}, 'closed': {}},
}, class ModalDialog extends St.Widget {
this._players = new Map();
this._proxy = new DBusProxy(Gio.DBus.session,
- 'org.freedesktop.DBus',
- '/org/freedesktop/DBus',
- this._onProxyReady.bind(this));
+ 'org.freedesktop.DBus',
+ '/org/freedesktop/DBus',
+ this._onProxyReady.bind(this));
}
get allowed() {
this._addPlayer(name);
});
this._proxy.connectSignal('NameOwnerChanged',
- this._onNameOwnerChanged.bind(this));
+ this._onNameOwnerChanged.bind(this));
}
_onNameOwnerChanged(proxy, sender, [name, oldOwner, newOwner]) {
width, height, rowStride, hasAlpha,
bitsPerSample, nChannels_, data,
] = hints['image-data'];
- return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
- bitsPerSample, width, height, rowStride);
+ return Shell.util_create_pixbuf_from_data(data,
+ GdkPixbuf.Colorspace.RGB,
+ hasAlpha,
+ bitsPerSample,
+ width,
+ height,
+ rowStride);
} else if (hints['image-path']) {
return this._iconForNotificationData(hints['image-path']);
}
_emitNotificationClosed(id, reason) {
this._dbusImpl.emit_signal('NotificationClosed',
- GLib.Variant.new('(uu)', [id, reason]));
+ GLib.Variant.new('(uu)', [id, reason]));
}
_emitActionInvoked(id, action) {
this._dbusImpl.emit_signal('ActionInvoked',
- GLib.Variant.new('(us)', [id, action]));
+ GLib.Variant.new('(us)', [id, action]));
}
}
if (sender) {
this._nameWatcherId = Gio.DBus.session.watch_name(sender,
- Gio.BusNameWatcherFlags.NONE,
- null,
- this._onNameVanished.bind(this));
+ Gio.BusNameWatcherFlags.NONE,
+ null,
+ this._onNameVanished.bind(this));
} else {
this._nameWatcherId = 0;
}
this._osdLabels = [];
this._monitorLabels = null;
Main.layoutManager.connect('monitors-changed',
- this._reset.bind(this));
+ this._reset.bind(this));
this._reset();
}
return this._client == client;
this._client = client;
- this._clientWatchId = Gio.bus_watch_name(Gio.BusType.SESSION, client, 0, null,
- (c, name) => {
- this.hide(name);
- });
+ this._clientWatchId = Gio.bus_watch_name(Gio.BusType.SESSION,
+ client, 0, null,
+ (c, name) => {
+ this.hide(name);
+ });
return true;
}
constructor() {
this._osdWindows = [];
Main.layoutManager.connect('monitors-changed',
- this._monitorsChanged.bind(this));
+ this._monitorsChanged.bind(this));
this._monitorsChanged();
}
Main.layoutManager.overviewGroup.connect('scroll-event',
- this._onScrollEvent.bind(this));
+ this._onScrollEvent.bind(this));
Main.xdndHandler.connect('drag-begin', this._onDragBegin.bind(this));
Main.xdndHandler.connect('drag-end', this._onDragEnd.bind(this));
() => {
this._windowSwitchTimeoutId = 0;
Main.activateWindow(dragEvent.targetActor._delegate.metaWindow,
- this._windowSwitchTimestamp);
+ this._windowSwitchTimestamp);
this.hide();
this._lastHoveredWindow = null;
return GLib.SOURCE_REMOVE;
const PadDiagram = GObject.registerClass({
Properties: {
- 'left-handed': GObject.ParamSpec.boolean('left-handed',
- 'left-handed', 'Left handed',
- GObject.ParamFlags.READWRITE |
- GObject.ParamFlags.CONSTRUCT_ONLY,
- false),
- 'image': GObject.ParamSpec.string('image', 'image', 'Image',
- GObject.ParamFlags.READWRITE |
- GObject.ParamFlags.CONSTRUCT_ONLY,
- null),
- 'editor-actor': GObject.ParamSpec.object('editor-actor',
- 'editor-actor',
- 'Editor actor',
- GObject.ParamFlags.READWRITE |
- GObject.ParamFlags.CONSTRUCT_ONLY,
- Clutter.Actor.$gtype),
+ 'left-handed': GObject.ParamSpec.boolean(
+ 'left-handed', 'left-handed', 'Left handed',
+ GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
+ false),
+ 'image': GObject.ParamSpec.string(
+ 'image', 'image', 'Image',
+ GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
+ null),
+ 'editor-actor': GObject.ParamSpec.object(
+ 'editor-actor', 'editor-actor', 'Editor actor',
+ GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
+ Clutter.Actor.$gtype),
},
}, class PadDiagram extends St.DrawingArea {
_init(params) {
this._editedAction = {type, number, dir, mode};
const settingsPath = `${this._settings.path}${key}/`;
- this._editedActionSettings = Gio.Settings.new_with_path('org.gnome.desktop.peripherals.tablet.pad-button',
- settingsPath);
+ this._editedActionSettings = Gio.Settings.new_with_path(
+ 'org.gnome.desktop.peripherals.tablet.pad-button',
+ settingsPath);
this._actionEditor.setSettings(this._editedActionSettings, type);
this._padDiagram.startEdition(type, number, dir);
}
});
if (padDevice == null) {
- invocation.return_error_literal(Gio.IOErrorEnum,
- Gio.IOErrorEnum.CANCELLED,
- 'Invalid params');
+ invocation.return_error_literal(
+ Gio.IOErrorEnum,
+ Gio.IOErrorEnum.CANCELLED,
+ 'Invalid params');
return;
}
let textureCache = St.TextureCache.get_default();
textureCache.connect('icon-theme-changed',
- this._onIconThemeChanged.bind(this));
+ this._onIconThemeChanged.bind(this));
let iconEffect = new Clutter.DesaturateEffect();
this._iconBox = new St.Bin({
});
Main.layoutManager.panelBox.add(this);
- Main.ctrlAltTabManager.addGroup(this, _('Top Bar'), 'focus-top-bar-symbolic',
- {sortGroup: CtrlAltTab.SortGroup.TOP});
+ Main.ctrlAltTabManager.addGroup(this,
+ _('Top Bar'), 'focus-top-bar-symbolic',
+ {sortGroup: CtrlAltTab.SortGroup.TOP});
Main.sessionMode.connect('updated', this._updatePanel.bind(this));
childBox.y1 = 0;
childBox.y2 = allocHeight;
if (this.get_text_direction() == Clutter.TextDirection.RTL) {
- childBox.x1 = Math.max(allocWidth - Math.min(Math.floor(sideWidth),
- leftNaturalWidth),
- 0);
+ childBox.x1 = Math.max(
+ allocWidth - Math.min(Math.floor(sideWidth), leftNaturalWidth),
+ 0);
childBox.x2 = allocWidth;
} else {
childBox.x1 = 0;
- childBox.x2 = Math.min(Math.floor(sideWidth),
- leftNaturalWidth);
+ childBox.x2 = Math.min(Math.floor(sideWidth), leftNaturalWidth);
}
this._leftBox.allocate(childBox);
childBox.y2 = allocHeight;
if (this.get_text_direction() == Clutter.TextDirection.RTL) {
childBox.x1 = 0;
- childBox.x2 = Math.min(Math.floor(sideWidth),
- rightNaturalWidth);
+ childBox.x2 = Math.min(Math.floor(sideWidth), rightNaturalWidth);
} else {
- childBox.x1 = Math.max(allocWidth - Math.min(Math.floor(sideWidth),
- rightNaturalWidth),
- 0);
+ childBox.x1 = Math.max(
+ allocWidth - Math.min(Math.floor(sideWidth), rightNaturalWidth),
+ 0);
childBox.x2 = allocWidth;
}
this._rightBox.allocate(childBox);
export const PopupBaseMenuItem = GObject.registerClass({
Properties: {
- 'active': GObject.ParamSpec.boolean('active', 'active', 'active',
- GObject.ParamFlags.READWRITE,
- false),
- 'sensitive': GObject.ParamSpec.boolean('sensitive', 'sensitive', 'sensitive',
- GObject.ParamFlags.READWRITE,
- true),
+ 'active': GObject.ParamSpec.boolean(
+ 'active', 'active', 'active',
+ GObject.ParamFlags.READWRITE,
+ false),
+ 'sensitive': GObject.ParamSpec.boolean(
+ 'sensitive', 'sensitive', 'sensitive',
+ GObject.ParamFlags.READWRITE,
+ true),
},
Signals: {
'activate': {param_types: [Clutter.Event.$gtype]},
this.label_actor = this.label;
this.label.connect('notify::text',
- this._syncVisibility.bind(this));
+ this._syncVisibility.bind(this));
this._syncVisibility();
this._separator = new St.Widget({
width, height, rowStride, hasAlpha,
bitsPerSample, nChannels_, data,
] = meta['icon-data'];
- gicon = Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
- bitsPerSample, width, height, rowStride);
+ gicon = Shell.util_create_pixbuf_from_data(data,
+ GdkPixbuf.Colorspace.RGB,
+ hasAlpha,
+ bitsPerSample,
+ width,
+ height,
+ rowStride);
}
if (gicon)
this._loginManager = LoginManager.getLoginManager();
this._loginManager.connect('prepare-for-sleep',
- this._prepareForSleep.bind(this));
+ this._prepareForSleep.bind(this));
this._loginSession = null;
this._getLoginSession();
}
let shooter = new Shell.Screenshot();
- shooter._watchNameId =
- Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
- this._onNameVanished.bind(this));
+ shooter._watchNameId = Gio.bus_watch_name(Gio.BusType.SESSION,
+ sender, 0, null, this._onNameVanished.bind(this));
this._screenShooter.set(sender, shooter);
let [x, y, width, height, flash, filename] = params;
[x, y, width, height] = this._scaleArea(x, y, width, height);
if (!this._checkArea(x, y, width, height)) {
- invocation.return_error_literal(Gio.IOErrorEnum,
- Gio.IOErrorEnum.CANCELLED,
- 'Invalid params');
+ invocation.return_error_literal(
+ Gio.IOErrorEnum,
+ Gio.IOErrorEnum.CANCELLED,
+ 'Invalid params');
return;
}
let screenshot = await this._createScreenshot(invocation);
let [x, y, width, height] = params;
[x, y, width, height] = this._scaleArea(x, y, width, height);
if (!this._checkArea(x, y, width, height)) {
- invocation.return_error_literal(Gio.IOErrorEnum,
- Gio.IOErrorEnum.CANCELLED,
- 'Invalid params');
+ invocation.return_error_literal(
+ Gio.IOErrorEnum,
+ Gio.IOErrorEnum.CANCELLED,
+ 'Invalid params');
return;
}
let flashspot = new Flashspot({x, y, width, height});
* within a performance automation script
*/
export function defineScriptEvent(name, description) {
- Shell.PerfLog.get_default().define_event(`script.${name}`,
- description,
- '');
+ Shell.PerfLog.get_default().define_event(
+ `script.${name}`, description, '');
}
/**
if (outputFile) {
let f = Gio.file_new_for_path(outputFile);
- let raw = f.replace(null, false,
- Gio.FileCreateFlags.NONE,
- null);
+ let raw = f.replace(null,
+ false,
+ Gio.FileCreateFlags.NONE,
+ null);
let out = Gio.BufferedOutputStream.new_sized(raw, 4096);
Shell.write_string_to_stream(out, '{\n');
first = false;
Shell.write_string_to_stream(out,
- `{ "name": ${JSON.stringify(name)},\n` +
- ` "description": ${JSON.stringify(metric.description)},\n` +
- ` "units": ${JSON.stringify(metric.units)},\n` +
- ` "value": ${JSON.stringify(metric.value)} }`);
+ `{ "name": ${JSON.stringify(name)},\n` +
+ ` "description": ${JSON.stringify(metric.description)},\n` +
+ ` "units": ${JSON.stringify(metric.units)},\n` +
+ ` "value": ${JSON.stringify(metric.value)} }`);
}
Shell.write_string_to_stream(out, ' ]');
this.style_class = 'grid-search-result';
- this.icon = new IconGrid.BaseIcon(this.metaInfo['name'],
- {createIcon: this.metaInfo['createIcon']});
+ this.icon = new IconGrid.BaseIcon(this.metaInfo['name'], {
+ createIcon: this.metaInfo['createIcon'],
+ });
let content = new St.Bin({
child: this.icon,
x_align: Clutter.ActorAlign.START,
let params = _modes[this.currentMode];
let defaults;
if (params.parentMode) {
- defaults = Params.parse(_modes[params.parentMode],
- _modes[DEFAULT_MODE]);
+ defaults = Params.parse(
+ _modes[params.parentMode],
+ _modes[DEFAULT_MODE]);
} else {
defaults = _modes[DEFAULT_MODE];
}
this._cachedOverviewVisible = false;
Main.overview.connect('showing',
- this._checkOverviewVisibleChanged.bind(this));
+ this._checkOverviewVisibleChanged.bind(this));
Main.overview.connect('hidden',
- this._checkOverviewVisibleChanged.bind(this));
+ this._checkOverviewVisibleChanged.bind(this));
}
/**
this._grabbedAccelerators.set(bindingAction, sender);
if (!this._grabbers.has(sender)) {
- let id = Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
- this._onGrabberBusNameVanished.bind(this));
+ let id = Gio.bus_watch_name(Gio.BusType.SESSION,
+ sender, 0, null, this._onGrabberBusNameVanished.bind(this));
this._grabbers.set(sender, id);
}
});
Main.extensionManager.connect('extension-state-changed',
- this._extensionStateChanged.bind(this));
+ this._extensionStateChanged.bind(this));
}
ListExtensions() {
new GLib.Variant('(sa{sv})', [newState.uuid, state]));
this._dbusImpl.emit_signal('ExtensionStatusChanged',
- GLib.Variant.new('(sis)', [newState.uuid, newState.state, newState.error]));
+ new GLib.Variant('(sis)', [newState.uuid, newState.state, newState.error]));
}
}
params = Params.parse(params, {actionMode: Shell.ActionMode.POPUP});
entry.menu = new EntryMenu(entry);
- entry._menuManager = new PopupMenu.PopupMenuManager(entry,
- {actionMode: params.actionMode});
+ entry._menuManager = new PopupMenu.PopupMenuManager(entry, {
+ actionMode: params.actionMode,
+ });
entry._menuManager.addMenu(entry.menu);
// Add an event handler to both the entry and its clutter_text; the former
this.mountOp = new Shell.MountOperation();
this.mountOp.connect('ask-question',
- this._onAskQuestion.bind(this));
+ this._onAskQuestion.bind(this));
this.mountOp.connect('ask-password',
- this._onAskPassword.bind(this));
+ this._onAskPassword.bind(this));
this.mountOp.connect('show-processes-2',
- this._onShowProcesses2.bind(this));
+ this._onShowProcesses2.bind(this));
this.mountOp.connect('aborted',
- this.close.bind(this));
+ this.close.bind(this));
this.mountOp.connect('show-unmount-progress',
- this._onShowUnmountProgress.bind(this));
+ this._onShowUnmountProgress.bind(this));
}
_closeExistingDialog() {
constructor() {
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(GnomeShellMountOpIface, this);
this._dbusImpl.export(Gio.DBus.session, '/org/gtk/MountOperationHandler');
- Gio.bus_own_name_on_connection(Gio.DBus.session, 'org.gtk.MountOperationHandler',
- Gio.BusNameOwnerFlags.REPLACE, null, null);
+ Gio.bus_own_name_on_connection(Gio.DBus.session,
+ 'org.gtk.MountOperationHandler',
+ Gio.BusNameOwnerFlags.REPLACE, null, null);
this._dialog = null;
let highContrast = this._buildItem(_('High Contrast'), A11Y_INTERFACE_SCHEMA, KEY_HIGH_CONTRAST);
this.menu.addMenuItem(highContrast);
- let magnifier = this._buildItem(_('Zoom'), APPLICATIONS_SCHEMA,
- 'screen-magnifier-enabled');
+ const magnifier = this._buildItem(_('Zoom'),
+ APPLICATIONS_SCHEMA, 'screen-magnifier-enabled');
this.menu.addMenuItem(magnifier);
let textZoom = this._buildFontItem();
this.menu.addMenuItem(textZoom);
- let screenReader = this._buildItem(_('Screen Reader'), APPLICATIONS_SCHEMA,
- 'screen-reader-enabled');
+ const screenReader = this._buildItem(_('Screen Reader'),
+ APPLICATIONS_SCHEMA, 'screen-reader-enabled');
this.menu.addMenuItem(screenReader);
- let screenKeyboard = this._buildItem(_('Screen Keyboard'), APPLICATIONS_SCHEMA,
- 'screen-keyboard-enabled');
+ const screenKeyboard = this._buildItem(_('Screen Keyboard'),
+ APPLICATIONS_SCHEMA, 'screen-keyboard-enabled');
this.menu.addMenuItem(screenKeyboard);
- let visualBell = this._buildItem(_('Visual Alerts'), WM_SCHEMA, KEY_VISUAL_BELL);
+ const visualBell = this._buildItem(_('Visual Alerts'),
+ WM_SCHEMA, KEY_VISUAL_BELL);
this.menu.addMenuItem(visualBell);
- let stickyKeys = this._buildItem(_('Sticky Keys'), A11Y_KEYBOARD_SCHEMA, KEY_STICKY_KEYS_ENABLED);
+ const stickyKeys = this._buildItem(_('Sticky Keys'),
+ A11Y_KEYBOARD_SCHEMA, KEY_STICKY_KEYS_ENABLED);
this.menu.addMenuItem(stickyKeys);
- let slowKeys = this._buildItem(_('Slow Keys'), A11Y_KEYBOARD_SCHEMA, KEY_SLOW_KEYS_ENABLED);
+ const slowKeys = this._buildItem(_('Slow Keys'),
+ A11Y_KEYBOARD_SCHEMA, KEY_SLOW_KEYS_ENABLED);
this.menu.addMenuItem(slowKeys);
- let bounceKeys = this._buildItem(_('Bounce Keys'), A11Y_KEYBOARD_SCHEMA, KEY_BOUNCE_KEYS_ENABLED);
+ const bounceKeys = this._buildItem(_('Bounce Keys'),
+ A11Y_KEYBOARD_SCHEMA, KEY_BOUNCE_KEYS_ENABLED);
this.menu.addMenuItem(bounceKeys);
- let mouseKeys = this._buildItem(_('Mouse Keys'), A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED);
+ const mouseKeys = this._buildItem(_('Mouse Keys'),
+ A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED);
this.menu.addMenuItem(mouseKeys);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this._reload();
Gio.DBus.system.signal_subscribe(this._BUS_NAME,
- this._BUS_PROPS_IFACE,
- 'PropertiesChanged',
- this._BUS_PATH,
- null,
- Gio.DBusSignalFlags.NONE,
- this._reload.bind(this));
+ this._BUS_PROPS_IFACE,
+ 'PropertiesChanged',
+ this._BUS_PATH,
+ null,
+ Gio.DBusSignalFlags.NONE,
+ this._reload.bind(this));
}
async _reload() {
this._mruSourcesBackup = null;
this._keybindingAction =
Main.wm.addKeybinding('switch-input-source',
- new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}),
- Meta.KeyBindingFlags.NONE,
- Shell.ActionMode.ALL,
- this._switchInputSource.bind(this));
+ new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}),
+ Meta.KeyBindingFlags.NONE,
+ Shell.ActionMode.ALL,
+ this._switchInputSource.bind(this));
this._keybindingActionBackward =
Main.wm.addKeybinding('switch-input-source-backward',
- new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}),
- Meta.KeyBindingFlags.IS_REVERSED,
- Shell.ActionMode.ALL,
- this._switchInputSource.bind(this));
+ new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}),
+ Meta.KeyBindingFlags.IS_REVERSED,
+ Shell.ActionMode.ALL,
+ this._switchInputSource.bind(this));
if (Main.sessionMode.isGreeter)
this._settings = new InputSourceSystemSettings();
else
let inputSourcesByShortName = {};
for (let i = 0; i < infosList.length; i++) {
let is = new InputSource(infosList[i].type,
- infosList[i].id,
- infosList[i].displayName,
- infosList[i].shortName,
- i);
+ infosList[i].id,
+ infosList[i].displayName,
+ infosList[i].shortName,
+ i);
is.connect('activate', this.activateInputSource.bind(this));
if (!(is.shortName in inputSourcesByShortName))
if (this._sourcesPerWindow && this._focusWindowNotifyId == 0) {
this._focusWindowNotifyId = global.display.connect('notify::focus-window',
- this._setPerWindowInputSource.bind(this));
+ this._setPerWindowInputSource.bind(this));
Main.overview.connectObject(
'showing', this._setPerWindowInputSource.bind(this),
'hidden', this._setPerWindowInputSource.bind(this), this);
if (group[j] == item) {
item.setOrnament(PopupMenu.Ornament.DOT);
item.prop.set_state(IBus.PropState.CHECKED);
- ibusManager.activateProperty(item.prop.get_key(),
- IBus.PropState.CHECKED);
+ ibusManager.activateProperty(
+ item.prop.get_key(), IBus.PropState.CHECKED);
} else {
group[j].setOrnament(PopupMenu.Ornament.NONE);
group[j].prop.set_state(IBus.PropState.UNCHECKED);
- ibusManager.activateProperty(group[j].prop.get_key(),
- IBus.PropState.UNCHECKED);
+ ibusManager.activateProperty(
+ group[j].prop.get_key(), IBus.PropState.UNCHECKED);
}
}
});
item.connect('toggled', () => {
if (item.state) {
item.prop.set_state(IBus.PropState.CHECKED);
- ibusManager.activateProperty(item.prop.get_key(),
- IBus.PropState.CHECKED);
+ ibusManager.activateProperty(
+ item.prop.get_key(), IBus.PropState.CHECKED);
} else {
item.prop.set_state(IBus.PropState.UNCHECKED);
- ibusManager.activateProperty(item.prop.get_key(),
- IBus.PropState.UNCHECKED);
+ ibusManager.activateProperty(
+ item.prop.get_key(), IBus.PropState.UNCHECKED);
}
});
break;
item = new PopupMenu.PopupMenuItem(prop.get_label().get_text());
item.prop = prop;
item.connect('activate', () => {
- ibusManager.activateProperty(item.prop.get_key(),
- item.prop.get_state());
+ ibusManager.activateProperty(
+ item.prop.get_key(), item.prop.get_state());
});
break;
this.connect('notify::enabled', this._onMaxAccuracyLevelChanged.bind(this));
this._watchId = Gio.bus_watch_name(Gio.BusType.SYSTEM,
- 'org.freedesktop.GeoClue2',
- 0,
- this._connectToGeoclue.bind(this),
- this._onGeoclueVanished.bind(this));
+ 'org.freedesktop.GeoClue2',
+ 0,
+ this._connectToGeoclue.bind(this),
+ this._onGeoclueVanished.bind(this));
this._onMaxAccuracyLevelChanged();
this._connectToGeoclue();
this._connectToPermissionStore();
this._connecting = true;
new GeoclueManager(Gio.DBus.system,
- 'org.freedesktop.GeoClue2',
- '/org/freedesktop/GeoClue2/Manager',
- this._onManagerProxyReady.bind(this));
+ 'org.freedesktop.GeoClue2',
+ '/org/freedesktop/GeoClue2/Manager',
+ this._onManagerProxyReady.bind(this));
return true;
}
_onDeviceAdded(proxy, emitter, params) {
let [path] = params;
- let device = new BoltDeviceProxy(Gio.DBus.system,
- BOLT_DBUS_NAME,
- path);
+ let device = new BoltDeviceProxy(Gio.DBus.system, BOLT_DBUS_NAME, path);
this.emit('device-added', device);
}
this._enrolling = true;
GLib.idle_add(GLib.PRIORITY_DEFAULT,
- this._enrollDevicesIdle.bind(this));
+ this._enrollDevicesIdle.bind(this));
}
async _enrollDevicesIdle() {
_ensureSource() {
if (!this._source) {
this._source = new MessageTray.Source(_('Thunderbolt'),
- 'thunderbolt-symbolic');
+ 'thunderbolt-symbolic');
this._source.connect('destroy', () => (this._source = null));
Main.messageTray.add(this._source);
this._label = new UserWidgetLabel(user);
this.add_child(this._label);
- this._label.bind_property('label-actor', this, 'label-actor',
- GObject.BindingFlags.SYNC_CREATE);
+ this._label.bind_property('label-actor',
+ this, 'label-actor',
+ GObject.BindingFlags.SYNC_CREATE);
this._user.connectObject(
'notify::is-loaded', this._updateUser.bind(this),
let workspaceManager = global.workspace_manager;
workspaceManager.connect('notify::n-workspaces',
- this._nWorkspacesChanged.bind(this));
+ this._nWorkspacesChanged.bind(this));
workspaceManager.connect('workspaces-reordered', () => {
this._workspaces.sort((a, b) => a.index() - b.index());
});
global.window_manager.connect('switch-workspace',
- this._queueCheckWorkspaces.bind(this));
+ this._queueCheckWorkspaces.bind(this));
global.display.connect('window-entered-monitor',
- this._windowEnteredMonitor.bind(this));
+ this._windowEnteredMonitor.bind(this));
global.display.connect('window-left-monitor',
- this._windowLeftMonitor.bind(this));
+ this._windowLeftMonitor.bind(this));
this._workspaceSettings = new Gio.Settings({schema_id: 'org.gnome.mutter'});
this._workspaceSettings.connect('changed::dynamic-workspaces', this._queueCheckWorkspaces.bind(this));
Main.osdWindowManager.show(monitorIndex, icon, label, null);
});
- this._gsdWacomProxy = new GsdWacomProxy(Gio.DBus.session, GSD_WACOM_BUS_NAME,
- GSD_WACOM_OBJECT_PATH,
- (proxy, error) => {
- if (error)
- log(error.message);
- });
+ this._gsdWacomProxy = new GsdWacomProxy(Gio.DBus.session,
+ GSD_WACOM_BUS_NAME, GSD_WACOM_OBJECT_PATH,
+ (proxy, error) => {
+ if (error)
+ log(error.message);
+ });
global.display.connect('pad-mode-switch', (display, pad, _group, _mode) => {
let labels = [];
let [success, geom] = actor.meta_window.get_icon_geometry();
if (success) {
actor.set_position(geom.x, geom.y);
- actor.set_scale(geom.width / actor.width,
- geom.height / actor.height);
+ actor.set_scale(
+ geom.width / actor.width,
+ geom.height / actor.height);
} else {
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
if (!monitor) {
let clone = new WindowPreview(metaWindow, this, this._overviewAdjustment);
clone.connect('selected',
- this._onCloneSelected.bind(this));
+ this._onCloneSelected.bind(this));
clone.connect('drag-begin', () => {
Main.overview.beginWindowDrag(metaWindow);
});
// workspace while we wait for the startup sequence to load.
let workspaceManager = global.workspace_manager;
Main.wm.keepWorkspaceAlive(workspaceManager.get_workspace_by_index(newWorkspaceIndex),
- WORKSPACE_KEEP_ALIVE_TIME);
+ WORKSPACE_KEEP_ALIVE_TIME);
}
// Start the animation on the workspace (which is actually
for (let k = start; k < start + count; k++) {
let metaWorkspace = workspaceManager.get_workspace_by_index(k);
let thumbnail = new WorkspaceThumbnail(metaWorkspace, this._monitorIndex);
- thumbnail.setPorthole(this._porthole.x, this._porthole.y,
- this._porthole.width, this._porthole.height);
+ thumbnail.setPorthole(
+ this._porthole.x, this._porthole.y,
+ this._porthole.width, this._porthole.height);
this._thumbnails.push(thumbnail);
this.add_actor(thumbnail);
if (pickedActor._delegate && pickedActor._delegate.handleDragOver) {
let [r_, targX, targY] = pickedActor.transform_stage_point(x, y);
let result = pickedActor._delegate.handleDragOver(this,
- dragEvent.dragActor,
- targX,
- targY,
- global.get_current_time());
+ dragEvent.dragActor,
+ targX,
+ targY,
+ global.get_current_time());
if (result != DND.DragMotionResult.CONTINUE)
return;
}
rules:
eqeqeq: off
- indent:
- - error
- - 4
- - ignoredNodes:
- - 'CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child'
- CallExpression:
- arguments: first
jsdoc/check-alignment: off
jsdoc/check-param-names: off
jsdoc/check-tag-names: off